@import "ol/ol.css";

#map {
    height: 100%;
    margin: 0px;
    padding: 0px;
}

.tab-gps {
    .GPS_signal_strength {
        table {
            td {
                padding: 0.25rem;
                &:nth-child(2) {
                    text-align: center;
                }
                &:nth-child(3) {
                    text-align: center;
                }
                &:nth-child(4) {
                    text-align: left;
                    padding-left: 10px;
                }
            }
        }
        .head {
            display: block;
            text-align: center;
            line-height: 20px;
            font-weight: bold;
            border-bottom: 1px solid var(--surface-500);
            background-color: var(--surface-400);
        }
    }
    meter {
        width: 100%;
        border-radius: 3px;
    }
    .GPS_info {
        .head {
            display: block;
            text-align: center;
            line-height: 20px;
            font-weight: bold;
            border-bottom: 1px solid var(--surface-500);
            background-color: var(--surface-400);
        }
        tr {
            // align every 2nd td to the right
            td:nth-child(2n) {
                text-align: right;
            }
        }
    }
    .gps_map {
        height: 460px;
    }
    .gps_config {
        font-size: 11px;
        input {
            width: 90px;
            height: 20px;
            margin: 0 10px 5px 0;
            padding-left: 5px;
            padding-right: 5px;
            border: 1px solid var(--surface-500);
            border-radius: 3px;
            background: var(--surface-200);
            color: var(--text);
        }
        .select {
            > div {
                &:first-child {
                    height: 20px;
                    margin-right: 15px;
                    margin-left: 3px;
                }
            }
        }
        span {
            line-height: 20px;
        }
        .gui_box {
            margin-bottom: 10px;
        }
        td {
            &:nth-child(2) {
                width: 38px;
            }
        }
        table {
            width: fit-content;
        }
    }
    dl.features {
        dt {
            width: 10px;
            height: 18px;
            line-height: 18px;
            input {
                margin-top: 2px;
            }
        }
        dd {
            margin: 0 0 0 20px;
            height: 18px;
            line-height: 18px;
        }
    }
    .freelabel {
        margin-left: 10px;
        position: relative;
    }
    .spacer_box {
        padding-bottom: 10px;
        width: calc(100% - 20px);
    }
    .select {
        margin-bottom: 5px;
        padding-bottom: 5px;
        border-bottom: 1px solid var(--surface-500);
        width: 100%;
        &:last-child {
            border-bottom: none;
            padding-bottom: 0;
            margin-bottom: 0;
        }
    }

    #connect {
        display: none;
        text-align: center;
        padding-top: 40%;
        a {
            font-weight: bold;
            margin-top: 10px;
        }
    }
    #waiting {
        margin-top: 0px;
        display: none;
        text-align: center;
        padding-top: 0px;
        background-image: url(../../images/loading-bars.svg);
        background-position: center 40%;
        background-size: 15%;
        height: 100%;
        background-repeat: no-repeat;
        width: 100%;
        .info {
            margin-top: 30%;
        }
    }
    #loadmap {
        margin-top: 0px;
        display: none;
        height: 100%;
        width: 100%;
        .map {
            width: 100%;
            height: 400px;
        }
        .controls {
            width: 100%;
            height: 33px;
            border-bottom-left-radius: 3px;
            border-bottom-right-radius: 3px;
            background-color: #d1d1d1;
            display: flex;
            justify-content: end;
            gap: 0.5rem;
            button {
                background-color: white;
                border-radius: 4px;
                border: 1px var(--surface-500) solid;
                color: grey;
                text-align: center;
                font-size: 20px;
                line-height: 10px;
                padding: 6px;
                margin-top: 5px;
                &:hover {
                    background-color: var(--surface-500);
                }
                &:active {
                    background-color: #e6e6e6;
                }
                &:first-child {
                    margin-left: -1px;
                    margin-right: 5px;
                    border-bottom-left-radius: 0px;
                    border-top-left-radius: 0px;
                }
                &:last-child {
                    margin-right: 0px;
                    border-bottom-right-radius: 0px;
                    border-top-right-radius: 0px;
                }
            }
        }
    }
    iframe {
        height: 400px;
        width: 100%;
    }
}
meter[value] {
    &::-webkit-meter-bar {
        background-color: #d2d2d2;
        border-radius: 2px;
        box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.95);
        box-shadow: 0 0 3px rgba(0, 0, 0, 0.25) inset;
    }
    &::-webkit-meter-value {
        background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.15)),
            -webkit-linear-gradient(left, #ffbb00, #ffbb00);
        border-radius: 2px;
        box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.25) inset;
    }
}
@media only screen and (max-width: 1455px) {
    .tab-gps {
        #waiting {
            .info {
                margin-top: 50%;
            }
        }
    }
}
@media only screen and (max-width: 1055px) {
    .tab-gps {
        iframe {
            height: 347px;
            width: 100%;
        }
        .gps_map {
            height: 403px;
        }
    }
    .tabs-gps {
        #loadmap {
            .map {
                height: 343px;
            }
        }
    }
}
@media only screen and (max-device-width: 1055px) {
    .tab-gps {
        iframe {
            height: 347px;
            width: 100%;
        }
        .gps_map {
            height: 403px;
        }
    }
    .tabs-gps {
        #loadmap {
            .map {
                height: 343px;
            }
        }
    }
}
